# This job definition automates the fuzzing tools Antigen/Fuzzlyn
trigger: none

schedules:
- cron: "0 14 * * 0"
  displayName: Sun at 6:00 AM (UTC-8:00)
  branches:
    include:
    - main
  always: true

variables:
  - template: /eng/pipelines/common/variables.yml
  # Set toolName variable from pipeline name so we can use it during template expansion
  - name: toolName
    value: ${{ variables['Build.DefinitionName'] }}

extends:
  template:  /eng/pipelines/common/templates/pipeline-with-resources.yml
  parameters:
    stages:
    - stage: Build
      jobs:
      - template: /eng/pipelines/common/platform-matrix.yml
        parameters:
          jobTemplate: /eng/pipelines/common/global-build-job.yml
          helixQueuesGroup: ci
          helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml
          buildConfig: checked
          platforms:
          # Linux tests are built on the OSX machines.
          - linux_arm
          - linux_arm64
          - linux_x64
          - windows_x64
          - windows_x86
          - windows_arm64
          - osx_arm64
          jobParameters:
            buildArgs: -s clr+libs -c $(_BuildConfig) -lc Release
            timeoutInMinutes: 360
            postBuildSteps:
              - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) $(_BuildConfig) $(archType) generatelayoutonly
                displayName: Create Core_Root
                condition: succeeded()
              - template: /eng/pipelines/coreclr/templates/jit-exploratory-steps.yml
                parameters:
                  toolName: ${{ variables.toolName }}
            extraVariablesTemplates:
              - template: /eng/pipelines/coreclr/templates/jit-exploratory-variables.yml
                parameters:
                  toolName: ${{ variables.toolName }}
